// 爷爷组件
<template>
  <base-card
    :disabled="disabled"
    :type="type"
    :size="size"
    :readonly="readonly"
    v-bind="attributes"
    @yeChange="onYeChange"
    @yeInput="onYeInput"
  ></base-card>
</template>

<script>
import BaseCard from './BaseCard.vue'

export default {
  components: {
    'base-card': BaseCard
  },
  data() {
    return {
      disabled: false,
      type: '',
      size: '',
      readonly: false,
      attributes: { // v-bind的新写法
        clearable: false,
        'prefix-icon': '',
      }
    }
  },
  methods: {
    onYeChange(v) {
      console.log('孙子组件调用了爷爷组件的yeChange事件，还传了值：', v)
    },
    onYeInput(v) {
      console.log('孙子组件调用了爷爷组件的yeInput事件，还传了值：', v)
    }
  }
}
</script>

<style></style>
